package com.yutian.springbootwebflux.client;

import com.yutian.springbootwebflux.util.OkHttpRestUtil;

/**
 * OkHttpRestUtil也支持请求webflux服务
 */
public class HttpClient {
    public static void main(final String[] args) {
        String body = OkHttpRestUtil.getUrlRes("http://localhost:8099/webflux/user/11", null, null);
        System.out.println(body); // response={"id":1,"name":"Test","age":31}
        body = OkHttpRestUtil.getUrlRes("http://localhost:8099/webflux/user/list?userIds=1,2", null, null);
        System.out.println(body); // response=[{"id":1,"name":"Test1","age":31},{"id":2,"name":"Test2","age":32}]
    }
}